package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.SysDistricts;
import com.ruoyi.system.mapper.SysDistrictsMapper;
import com.ruoyi.system.service.ISysDistrictsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 地区 服务层实现
 *
 * @author ruoyi
 * @date 2018-12-19
 */
@Service
public class SysDistrictsServiceImpl implements ISysDistrictsService
{
	@Autowired
	private SysDistrictsMapper SysDistrictsMapper;

	/**
     * 查询地区信息
     *
     * @param id 地区ID
     * @return 地区信息
     */
    @Override
	public SysDistricts selectSysDistrictsById(Integer id)
	{
	    return SysDistrictsMapper.selectSysDistrictsById(id);
	}

	/**
     * 查询地区列表
     *
     * @param SysDistricts 地区信息
     * @return 地区集合
     */
	@Override
	public List<SysDistricts> selectSysDistrictsList(SysDistricts SysDistricts)
	{
	    return SysDistrictsMapper.selectSysDistrictsList(SysDistricts);
	}

    /**
     * 新增地区
     *
     * @param SysDistricts 地区信息
     * @return 结果
     */
	@Override
	public int insertSysDistricts(SysDistricts SysDistricts)
	{
	    return SysDistrictsMapper.insertSysDistricts(SysDistricts);
	}

	/**
     * 修改地区
     *
     * @param SysDistricts 地区信息
     * @return 结果
     */
	@Override
	public int updateSysDistricts(SysDistricts SysDistricts)
	{
	    return SysDistrictsMapper.updateSysDistricts(SysDistricts);
	}

	/**
     * 删除地区对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteSysDistrictsByIds(String ids)
	{
		return SysDistrictsMapper.deleteSysDistrictsByIds(Convert.toStrArray(ids));
	}
	
}
